select REPLACE(REPLACE(variable_value, CHAR(13), ''), CHAR(10), ''), '||', page_name, '||', 
concat('http://wix.ua/' COLLATE Polish_CI_AI, page_link) as link
from variable_values
inner join pages on (pages.page_id = variable_values.page_id)
where language_id = 16
and page_type_id not in (161, 176, 163, 164)
and coalesce(variable_value, '') <> ''
order by pages.page_id;